Fix NoiseSensitivity ragas API compatibility#441
Conversation
Remove unsupported 'focus' parameter from ragas NoiseSensitivity metric instantiation Amp-Thread-ID: https://ampcode.com/threads/T-43be9938-fec7-4262-9667-1a8fa1aae3e3 Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Amp <amp@sourcegraph.com>
|
Pull requests must include at least one of the required labels: |
PR SummaryThis PR removes the explicit 'focus' parameter from the call to the noise_sensitivity metric in the NoiseSensitivity test module. The change ensures that the metric is now invoked with its default configuration rather than using a specific focus. This update streamlines the metric invocation and aligns it with its revised parameter requirements as defined in the metric's implementation. Test Suggestions
|
|
I am not able to reproduce this error. Using |
AnilSorathiya
left a comment
There was a problem hiding this comment.
I am not able to reproduce this either.
|
@nibalizer We can probably close this PR. We’ve capped the latest version of Ragas to Ragas 0.2.7 (our version) Ragas 0.2.14 (when |
Pull Request Description
What and why?
Fixed a
TypeErrorin theNoiseSensitivitytest caused by incompatibility with the ragas library API. The ragasNoiseSensitivitymetric no longer accepts afocusparameter in its constructor, which was causing the test to fail withTypeError: NoiseSensitivity.__init__() got an unexpected keyword argument focus.Removed the
focus=focusparameter from thenoise_sensitivity()metric instantiation while keeping the parameter available in the wrapper function for backward compatibility.How to test
Run the NoiseSensitivity test using the example code:
The test should now execute without the TypeError.
What needs special review?
The
focusparameter is still accepted by the wrapper function but is no longer passed to the underlying ragas metric. Verify that this doesn't break existing behavior or if the parameter should be removed entirely from the function signature.Dependencies, breaking changes, and deployment notes
Release notes
Fixed compatibility issue with ragas library in NoiseSensitivity test that was causing TypeError when running the test.
Checklist